using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ws_zbcode
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnParam_Click(object sender, EventArgs e)
        {
            txtOutput.Clear();
            string[] lines = txtInput.Lines;
            for (int i = 0; i < lines.Length; i++)
            {

                string strTemp = txtFormat1.Text.Replace("{0}", lines[i].ToLower());
                txtOutput.Text += strTemp + "\r\n";
            }

            txtOutput.Text += "\r\n";

            for (int i = 0; i < lines.Length; i++)
            {
                string strTemp = txtFormat2.Text.Replace("{0}", lines[i].ToLower());
                txtOutput.Text += strTemp;
            }

            Clipboard.SetText(txtOutput.Text);
        }

        private void btnUpdate_Click(object sender, EventArgs e)
        {
            txtOutput.Clear();
            string[] lines = txtInput.Lines;
            for (int i = 0; i < lines.Length; i++)
            {
                string strTemp = "\r\n,"+lines[i]+" = {"+(41+i)+"}";
                txtOutput.Text += strTemp;
            }

            Clipboard.SetText(txtOutput.Text);
        }

        private void btnUpdateEqual_Click(object sender, EventArgs e)
        {
            txtOutput.Clear();
            string[] lines = txtInput.Lines;
            for (int i = 0; i < lines.Length; i++)
            {
                string strTemp = "\r\n arr[" + (41 + i) + "] = " + lines[i].ToLower()+";";
                txtOutput.Text += strTemp;
            }

            Clipboard.SetText(txtOutput.Text);
        }

        private void btnImport_Click(object sender, EventArgs e)
        {
            txtOutput.Clear();
            string[] lines = txtInput.Lines;
            for (int i = 0; i < lines.Length; i++)
            {
                string strTemp = "\r\n ,{" + (41 + i) + "} /*" + lines[i] + "*/";
                txtOutput.Text += strTemp;
            }

            Clipboard.SetText(txtOutput.Text);
        }

        private void btnImportEqual_Click(object sender, EventArgs e)
        {
            txtOutput.Clear();
            string[] lines = txtInput.Lines;
            for (int i = 0; i < lines.Length; i++)
            {
                string strTemp = "\r\n arr[" + (41 + i) + "] = QuesReader[\"" + lines[i] + "\"];";
                txtOutput.Text += strTemp;
            }

            Clipboard.SetText(txtOutput.Text);
        }
    }
}